package xxl.robotlegs.framework.api 
{
	import xxl.signals.api.IMapSignal;
	
	/**
	 * ...
	 * @author XXL
	 */
	public interface IContext 
	{
		function get contextLifecycleSignal():IContextLifecycleSignal;
		function get injector():IInjector;
		function get logLevel():uint;
		function set logLevel(value:uint):void;
		function get state():String;
		function get uninitialized():Boolean;
		function get initialized():Boolean;
		function get active():Boolean;
		function get suspended():Boolean;
		function get destroyed():Boolean;
		function install(...extensions):IContext;
		function configure(...configs):IContext;
		function addChild(child:IContext):IContext;
		function removeChild(child:IContext):IContext;
		function addConfigHandler(matcher:IMatcher, handler:Function):IContext;
		function getLogger(source:Object):ILogger;
		function addLogTarget(target:ILogTarget):IContext;
		function detain(...instances):IContext;
		function release(...instances):IContext;
		function initialize(callback:Function = null):void;
		function suspend(callback:Function = null):void;
		function resume(callback:Function = null):void;
		function destroy(callback:Function = null):void;
		function beforeInitializing(handler:Function):IContext;
		function whenInitializing(handler:Function):IContext;
		function afterInitializing(handler:Function):IContext;
		function beforeSuspending(handler:Function):IContext;
		function whenSuspending(handler:Function):IContext;
		function afterSuspending(handler:Function):IContext;
		function beforeResuming(handler:Function):IContext;
		function whenResuming(handler:Function):IContext;
		function afterResuming(handler:Function):IContext;
		function beforeDestroying(handler:Function):IContext;
		function whenDestroying(handler:Function):IContext;
		function afterDestroying(handler:Function):IContext;
	}
	
}